<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>倒计时</title>
	<link rel="stylesheet" href="./dingshiqi.css">
	<script type="text/javascript">
		window.onload = function(){
		/*	tian = document.getElementsByClassName('aa');
			shi = document.getElementById('shi');
			fen = document.getElementById('fen');
			miao = document.getElementById('miao');*/
			function bd(){
				xianzai = new Date();
				mori = new Date('2018,01,01');
				res= mori.getTime()-xianzai.getTime();
				d=Math.floor(res/1000/60/60/24);
				h=Math.floor(res/1000/60/60%24);
				m=Math.floor(res/1000/60%60);
				s=Math.floor(res/1000%60);
				alist=document.getElementsByClassName('aa');
				alist[0].innerHTML=d;
				alist[1].innerHTML=h;
				alist[2].innerHTML=m;
				alist[3].innerHTML=s;
			// alert(alist);

			}
			setInterval(bd,1000);
			

		}
	</script>
</head>
<body>
	<div class="zhengti">
		<div class="tou">距离末日还有</div>
		<div class="xia">
			<div class="xia_shang">
			<a href="" class="aa" id='tian'>55</a><span class="maohao">:</span>
			<a href="" class="aa" id= 'shi'>10</a><span class="maohao">:</span>
			<a href="" class="aa" id= 'fen'>20</a><span class="maohao">:</span>
			<a href="" class="aa" id='miao'>30</a>
			</div>
			<div class="xia_fooler">
				<span class="riqi">天</span>
				<span class="riqi">时</span>
				<span class="riqi">分</span>
				<span class="riqi1">秒</span>
			</div>
		</div>

	</div>
</body>
</html>